package com.yboot.module.quartz.controller;

import com.yboot.module.quartz.model.dto.SysJobLogDto;
import com.yboot.module.quartz.model.entity.SysJobLogEntity;
import com.yboot.module.quartz.model.query.SysJobLogQuery;
import com.yboot.module.quartz.model.vo.SysJobLogDetailVo;
import com.yboot.module.quartz.model.vo.SysJobLogVo;
import com.yboot.module.quartz.service.ISysJobLogService;
import com.yboot.starter.common.core.web.vo.Result;
import com.yboot.starter.mybatis.core.base.controller.BaseController;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 定时任务调度日志表
 * @author yangcs
 * @date 2025-08-29
 */
@RestController
@RequestMapping("/api/sysJobLog")
public class SysJobLogController extends BaseController<ISysJobLogService, SysJobLogEntity, SysJobLogVo, SysJobLogDetailVo, SysJobLogQuery, SysJobLogDto> {

    /**
     * 清空日志
     * @return
     */
    @PostMapping("clearAll")
    public Result<Void> clearAll() {
        return toResult(baseService.clearAll());
    }
}
